package com.adcc.loadsheet.billing.mapper.mysql.contractuser;

import com.adcc.loadsheet.billing.entity.contractuser.ContractUserEntity;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;
import java.util.Map;

/**
 * 合同用户Mapper
 * Created by zhaoml on 2020-04-13.
 */
@Mapper
public interface ContractUserEntityMapper {

    //根据条件获取合同用户
    List<ContractUserEntity> select(Map<String, Object> map);

    //根据主键ID查询
    ContractUserEntity selectByPrimaryKey(Integer contractUserId);

    //根据规则简称查询对应实体
    ContractUserEntity findByUserAbbrev(String userAbbrev);

    //创建合同用户
    Integer insert(ContractUserEntity record);

    //修改合同用户
    Integer update(ContractUserEntity record);

    //删除合同用户
    int deleteByPrimaryKey(Integer contractUserId);

    //根据登录用户名，查询用户关联的合同用户
    ContractUserEntity findByLoginID(String loginID);

    //查未指定计费规则的合同用户
    String selectNoBillingRule();
}